package mealhistory;

import java.io.Serializable;

public class Mealitem implements Serializable {
    private int id; // 新添加的字段，用于标识每个Mealitem对象
    private String food;
    private int weight;
    private double consumption;
    private String date;
    private String type;

    public Mealitem(int id, String foodname, int weight,double consumption, String date, String type) {
        this.id = id;
        this.food = foodname;
        this.weight=weight;
        this.consumption = consumption;
        this.date = date;
        this.type = type;
    }

    public int getId() {
        return id;
    }

    public String getFoodname() {
        return food;
    }

    public int getWeight(){
        return weight;
    }

    public double getConsumption() {
        return consumption;
    }

    public String getDate() {
        return date;
    }

    public String getType() {
        return type;
    }
}
